<script setup>
import ItemViewerGroup from '../ItemViewerGroup.vue'

defineProps({
  control: Object,
  model: Object,
});
</script>

<template>
  <div class="sub-form" v-if="model" cols="12">
    <div class="title">{{control.props.label}}</div>
    <div class="item" v-for="(item, index) in control.props.columns" :key="index">
      <ItemViewerGroup :controls="item.controls" :formModel="model"></ItemViewerGroup>
    </div>
  </div>
</template>
<style scoped lang="scss">
.sub-form{
  @apply border
}
</style>
